package com.xrf;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Users {
    // 人员管理
    private String personalmanagement;
    // 权限分配
    private Double Permissionallocation;
    // 工程内容
    private Double Projectcontent;
    // 审核意见
    private String auditopinion;
    // 监理资料
    private Long Supervisiondata;
    // 监理细则
    private Long Supervisionrules;
    // 审查意见表
    private Double Reviewopiniontable;
    // 监理记录
    private String Supervisionrecords;
    // 开工报告
    private Double reportonstartingofconstructionwork;
    // 工程信息
    private int Engineeringinformation;
    // 综合查询
    private String comprehensiveinquiry;

    private static List<Users> list = new ArrayList<>();
    private static Scanner scanner = new Scanner(System.in);

    public Users() {}
    
    public Users(String personalmanagement, Double Permissionallocation, Double Projectcontent, 
                String auditopinion, Long Supervisiondata, Long Supervisionrules, 
                Double Reviewopiniontable, String Supervisionrecords, 
                Double reportonstartingofconstructionwork, int Engineeringinformation, 
                String comprehensiveinquiry) {
        this.personalmanagement = personalmanagement;
        this.Permissionallocation = Permissionallocation;
        this.Projectcontent = Projectcontent;
        this.auditopinion = auditopinion;
        this.Supervisiondata = Supervisiondata;
        this.Supervisionrules = Supervisionrules;
        this.Reviewopiniontable = Reviewopiniontable;
        this.Supervisionrecords = Supervisionrecords;
        this.reportonstartingofconstructionwork = reportonstartingofconstructionwork;
        this.Engineeringinformation = Engineeringinformation;
        this.comprehensiveinquiry = comprehensiveinquiry;
    }

    // 获取人员管理值
    public String getPersonalmanagement() {
        return this.personalmanagement;
    }
    
    // 设置人员管理值
    public void setPersonalmanagement(String personalmanagement) {
        this.personalmanagement = personalmanagement;
    }
    
    // 获取权限分配值
    public Double getPermissionallocation() {
        return this.Permissionallocation;
    }
    
    // 设置权限分配值
    public void setPermissionallocation(Double Permissionallocation) {
        this.Permissionallocation = Permissionallocation;
    }
    
    // 获取工程内容值
    public Double getProjectcontent() {
        return this.Projectcontent;
    }
    
    // 设置工程内容值
    public void setProjectcontent(Double Projectcontent) {
        this.Projectcontent = Projectcontent;
    }
    
    // 获取审核意见值
    public String getAuditopinion() {
        return this.auditopinion;
    }
    
    // 设置审核意见值
    public void setAuditopinion(String auditopinion) {
        this.auditopinion = auditopinion;
    }
    
    // 获取监理资料值
    public Long getSupervisiondata() {
        return this.Supervisiondata;
    }
    
    // 设置监理资料值
    public void setSupervisiondata(Long Supervisiondata) {
        this.Supervisiondata = Supervisiondata;
    }
    
    // 获取监理细则值
    public Long getSupervisionrules() {
        return this.Supervisionrules;
    }
    
    // 设置监理细则值
    public void setSupervisionrules(Long Supervisionrules) {
        this.Supervisionrules = Supervisionrules;
    }
    
    // 获取审查意见表值
    public Double getReviewopiniontable() {
        return this.Reviewopiniontable;
    }
    
    // 设置审查意见表值
    public void setReviewopiniontable(Double Reviewopiniontable) {
        this.Reviewopiniontable = Reviewopiniontable;
    }
    
    // 获取监理记录值
    public String getSupervisionrecords() {
        return this.Supervisionrecords;
    }
    
    // 设置监理记录值
    public void setSupervisionrecords(String Supervisionrecords) {
        this.Supervisionrecords = Supervisionrecords;
    }
    
    // 获取开工报告值
    public Double getReportonstartingofconstructionwork() {
        return this.reportonstartingofconstructionwork;
    }
    
    // 设置开工报告值
    public void setReportonstartingofconstructionwork(Double reportonstartingofconstructionwork) {
        this.reportonstartingofconstructionwork = reportonstartingofconstructionwork;
    }
    
    // 获取工程信息值
    public int getEngineeringinformation() {
        return this.Engineeringinformation;
    }
    
    // 设置工程信息值
    public void setEngineeringinformation(int Engineeringinformation) {
        this.Engineeringinformation = Engineeringinformation;
    }
    
    // 获取综合查询值
    public String getComprehensiveinquiry() {
        return this.comprehensiveinquiry;
    }
    
    // 设置综合查询值
    public void setComprehensiveinquiry(String comprehensiveinquiry) {
        this.comprehensiveinquiry = comprehensiveinquiry;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("人员管理:").append(personalmanagement).append("\t");
        builder.append("权限分配:").append(Permissionallocation).append("\t");
        builder.append("工程内容:").append(Projectcontent).append("\t");
        builder.append("审核意见:").append(auditopinion).append("\t");
        builder.append("监理资料:").append(Supervisiondata).append("\t");
        builder.append("监理细则:").append(Supervisionrules).append("\t");
        builder.append("审查意见表:").append(Reviewopiniontable).append("\t");
        builder.append("监理记录:").append(Supervisionrecords).append("\t");
        builder.append("开工报告:").append(reportonstartingofconstructionwork).append("\t");
        builder.append("工程信息:").append(Engineeringinformation).append("\t");
        builder.append("综合查询:").append(comprehensiveinquiry).append("\t");
        return builder.toString();
    }

    public static void addData() {
        System.out.println("--------添加数据-------");
        System.out.println("请输入人员管理：");
        String var0 = scanner.next();
        System.out.println("请输入权限分配：");
        Double var1 = scanner.nextDouble();
        System.out.println("请输入工程内容：");
        Double var2 = scanner.nextDouble();
        System.out.println("请输入审核意见：");
        String var3 = scanner.next();
        System.out.println("请输入监理资料：");
        Long var4 = scanner.nextLong();
        System.out.println("请输入监理细则：");
        Long var5 = scanner.nextLong();
        System.out.println("请输入审查意见表：");
        Double var6 = scanner.nextDouble();
        System.out.println("请输入监理记录：");
        String var7 = scanner.next();
        System.out.println("请输入开工报告：");
        Double var8 = scanner.nextDouble();
        System.out.println("请输入工程信息：");
        int var9 = scanner.nextInt();
        System.out.println("请输入综合查询：");
        String var10 = scanner.next();
        Users data = new Users(var0, var1, var2, var3, var4, var5, var6, var7, var8, var9, var10);
        list.add(data);
    }

    public static void removeData() {
        System.out.println("--------删除数据-------");
        System.out.println("请输入索引：");
        int index = scanner.nextInt();
        list.remove(index);
    }

    public static void updateData() {
        System.out.println("--------修改数据-------");
        System.out.println("请输入索引：");
        int index = scanner.nextInt();
        System.out.println("请输入人员管理：");
        String var0 = scanner.next();
        System.out.println("请输入权限分配：");
        Double var1 = scanner.nextDouble();
        System.out.println("请输入工程内容：");
        Double var2 = scanner.nextDouble();
        System.out.println("请输入审核意见：");
        String var3 = scanner.next();
        System.out.println("请输入监理资料：");
        Long var4 = scanner.nextLong();
        System.out.println("请输入监理细则：");
        Long var5 = scanner.nextLong();
        System.out.println("请输入审查意见表：");
        Double var6 = scanner.nextDouble();
        System.out.println("请输入监理记录：");
        String var7 = scanner.next();
        System.out.println("请输入开工报告：");
        Double var8 = scanner.nextDouble();
        System.out.println("请输入工程信息：");
        int var9 = scanner.nextInt();
        System.out.println("请输入综合查询：");
        String var10 = scanner.next();
        Users data = new Users(var0, var1, var2, var3, var4, var5, var6, var7, var8, var9, var10);
        list.set(index, data);
    }

    public static void selectAll() {
        for (int i = 0; i < list.size(); i++) {
            System.out.println("序号" + i + "\t" + list.get(i));
        }
    }

    public static void selectByIndex() {
        System.out.println("请输入索引：");
        int index = scanner.nextInt();
        System.out.println(list.get(index));
    }

    public static void clearList() {
        list.clear();
    }
}